package com.fulihui.wgj.facade.service.retention;

import com.fulihui.common.error.InvokeServiceException;
import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.rpc.SimpleResult;
import com.fulihui.wgj.facade.dto.WxSevenRetentionDTO;
import com.fulihui.wgj.facade.request.retention.WxSevenRetentionPageRequest;
import com.fulihui.wgj.facade.request.retention.WxSevenRetentionQueryRequest;
import com.fulihui.wgj.facade.request.retention.WxSevenRetentionRequest;
import com.fulihui.wgj.facade.result.retention.WxSevenRetentionPageResult;

import java.util.List;

/**
 * 微信粉丝七日留存Service
 *
 * @author wang_wx
 * @date 2018-07-03
 */
public interface WxSevenRetentionService {

    /**
     * 保存七日留存数据
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveWxSevenRetention(WxSevenRetentionRequest request) throws InvokeServiceException;

    /**
     * 更新七日留存数据
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult updateByAppIdAndDate(WxSevenRetentionRequest request) throws InvokeServiceException;

    /**
     * 查询七日留存
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxSevenRetentionDTO>> queryWxSevenRetentions(WxSevenRetentionQueryRequest request) throws InvokeServiceException;

    /**
     * 查询七日留存-分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    WxSevenRetentionPageResult queryPageWxSevenRetentions(WxSevenRetentionPageRequest request) throws InvokeServiceException;
}
